<template>
	<el-form label-width="100px">
		<el-row :gutter="20" v-for="item in supplierConfig" class="row-bg">
			<el-col :span="14"><div class="grid-content">{{ item.supplier.orgNameZh }}</div></el-col>
			<el-col :span="6"><div class="grid-content">{{ calcPoint(item.point.point) }}</div></el-col>
		</el-row>
	</el-form>
</template>

<script>
	import { supplierPrice } from '@/api/price.api'
	export default{
		name: "point-supplier-config",
		data() {
			return {
				supplierConfig: []
			}
		},
		props: {
			priceId: {
				type: String,
				default: ""
			},
		},
		methods: {
			init() {
				supplierPrice(this.priceId).then(res => {
					this.supplierConfig = res
				})
			},
			calcPoint(point) {
				return (point/100).toFixed(2) + "%"
			},
		}
	}
</script>

<style scoped lang="scss">
	.row-bg{
		background: #f9fafc;
		padding: 10px  0;
	}
</style>